<?php

class Core_Action_Admin_System_Appearance_Menu_Index extends Action_Admin
{
	function execute($request, $initial = FALSE)
	{
		if ($initial)
		{
			Agilet::setVar('breadcrum', array(
				array(
					'url' => 'admin/system/appearance',
					'label' => 'Appearance'
				),
				array(
					'url' => 'admin/system/appearance/menu',
					'label' => 'Menu'
				)
			));

		}
		$table = Model::getTable('core/menu');
		$select = $table -> select();
		$items = $table -> fetchAll($select);

		$title = 'Menu';

		$data = array(
			'title' => $title,
			'items' => $items
		);

		$request -> response = View::render($script = 'core/html/admin/system/appearance/menu/index', $data);
	}

}
